//
//  shenhemineViewController.m
//  movie
//
//  Created by HaoYang on 2018/5/3.
//  Copyright © 2018年 白浩洋. All rights reserved.
//

#import "shenhemineViewController.h"
#import "NBAFeedBackViewController.h"
#import "guanyuViewController.h"
@interface shenhemineViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong)UITableView *tabView;
@property (strong,nonatomic)NSMutableArray *dateSource;
@end

@implementation shenhemineViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self tabView];
    // Do any additional setup after loading the view.
}
- (UITableView *)tabView{
    if(!_tabView){
        _tabView = [[UITableView alloc]initWithFrame:CGRectMake(0, PXChange(20), ScreenWidth, PXChange(1000))];
        _tabView.delegate = self;
        _tabView.dataSource =self;
        [_tabView setScrollEnabled:NO];
        _tabView.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero];
        [self.view addSubview:_tabView];
    }
    return _tabView;
}
-(NSMutableArray *)dateSource{
    if(!_dateSource){
        _dateSource = [NSMutableArray arrayWithArray:@[@"意见反馈",@"关于"]];
    }
    return _dateSource;
}
#pragma mark - tableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.dateSource.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return PXChange(106);
}
#pragma mark - tableViewDelegate
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    if(!cell){
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cell"];
        cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.textLabel.text = self.dateSource[indexPath.row];
    cell.textLabel.textColor = [UIColor colorWithHexString:@"#333333"];
    cell.textLabel.font = [UIFont systemFontOfSize:PXChange(28)];
    return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    switch (indexPath.row) {
        case 0:{
            NBAFeedBackViewController *fd = [[NBAFeedBackViewController alloc]init];
            fd.hidesBottomBarWhenPushed = YES;
            [self.navigationController pushViewController:fd animated:YES];
        }
            break;
        case 1:{
            guanyuViewController *fd = [[guanyuViewController alloc]init];
            fd.hidesBottomBarWhenPushed = YES;
            [self.navigationController pushViewController:fd animated:YES];
        }
            break;
        case 2:{
            
        }
            break;
        case 3:{
           
        }
            break;
        case 4:{
        }
            break;
            
        default:
            break;
    }
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
